package hankz.spring.beans.factory;

import hankz.spring.beans.BeansException;

import java.util.Map;

/**
 * @description: TODO
 * @author: zzc
 * @modified By: zzc
 * @date: Created in 2021/11/21 17:03
 * @version:v1.0
 */
public interface ListableBeanFactory extends BeanFactory {

    /**
     * 按照类型返回Bean实例
     *
     * @param type
     * @param <T>
     * @return
     * @throws BeansException
     */
    <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException;

    /**
     * 返回注册表中所有的Bean名称
     *
     * @return
     */
    String[] getBeanDefinitionNames();

}
